﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<IPMS.Models.User>>" %>
<%@ Import Namespace="IPMS" %>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server">
    IPMS > Danh sách thành viên
</asp:Content>
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="CSS">
    <link type="text/css" rel="Stylesheet" href="../../Content/css/list.css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="server">

    <div id="main">
        <div id="m-top">
            <img src="../../Content/images/user1.png" alt="user" />
            <h4>Danh sách thành viên</h4>
            <div id="action">
                <a href="<%: IPMS.Library.Helper.GetActionLink("create", "user")%>" title="Thêm tài khoản người dùng">
                    <img src="../../Content/images/add1.png" alt="Thêm TK"/>
                </a>
            </div>
        </div><!--end of m-top-->
            <div id="list">
                <div class="heading">
                    <div style="width:3%;">
                        <input type="checkbox" name="chkAll" id="chkAll" value="0"/>
                    </div>  
                    <div style="width:12%;">
                        Tài khoản
                    </div>
                    <div style="width:15%;">
                        Họ tên
                    </div>
                    <div style="width:10%;">Chức vụ</div>
                    <div style="width:15%;">Đơn vị</div>
                    <div style="width:20%;">Email</div>
                    <div style="width:10%;">Điện thoại</div>
                    <div style="width:7%;">Kích hoạt</div>
                    <div style="width:7%;">Thao tác</div>
                </div><!--end of #list .heading -->
                <%
                    int index = 1;
                    foreach (IPMS.Models.User user in Model)
                    {
                 %>
                 <div class="row <%: (index==Model.Count)? "last" : ""%>">
                    <div style="width:3%;">
                        <input type="checkbox" name="chkID" value="<%:user.ID %>"/>
                    </div>  
                    <div style="width:12%;">
                        <%: user.Username %>
                    </div>
                    <div style="width:15%;">
                        <%: user.Fullname %>
                    </div>
                    <div style="width:10%;">
                        <%: user.Role.Name  %>
                    </div>
                    <div style="width:15%;">
                        <%: user.Department.Name %>
                    </div>
                    <div style="width:20%;">
                        <%: user.Email %>
                    </div>
                    <div style="width:10%;">
                        <%: IPMS.Library.Helper.GetHTML(user.Phone) %>
                    </div>
                    <div style="width:7%;">
                        <%if (user.Actived)
                          {
                        %>
                        <img src="../../Content/images/actived.png" alt="Yes"/>
                        <%
                            }
                          else
                          { %>
                          <img src="../../Content/images/noactived.png" alt="No"/>
                        <%
                            }
                        %>
                    </div>
                    <div style="width:7%;">
                        <a href="<%: IPMS.Library.Helper.GetActionLink("edit", "user", user.ID)%>" title="Chỉnh sửa thông tin">
                            <img src="../../Content/images/edit.png" alt="Sửa"/>
                        </a>
                        <a href="<%: IPMS.Library.Helper.GetActionLink("delete", "user", user.ID)%>" title="Xóa Tài khoản">
                            <img src="../../Content/images/delete1.png" alt="Xóa"/>
                        </a>
                    </div>
                </div><!--end of #list .row -->
                 <%
                     index++;
                    }
                 %>
                
                
            </div><!--end of list -->
        </div>

</asp:Content>
